package com.cmc.cloud.cmclink.doc.api.document.req.si;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 提单箱型信息 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 *
 * @author codegen
 */
@Data
public class BlnoCntrBaseDto {

    @Schema(description = "提单主信息id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14359")
    private Long blnoId;

    @Schema(description = "箱号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{blnocntr.cntrno.notblank}")
    @Length(max = 12, message = "{blnocntr.cntrno.length}")
    private String cntrNo;

    @Schema(description = "铅封号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{blnocntr.sealno.notblank}")
    @Length(max = 100, message = "{blnocntr.sealno.length}")
    private String sealNo;

    @Schema(description = "箱型", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @NotBlank(message = "{blnocntr.cntrtype.notblank}")
    @Length(max = 2, message = "{blnocntr.cntrtype.length}")
    private String cntrType;

    @Schema(description = "尺寸", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{blnocntr.cntrsize.notblank}")
    @Length(max = 2, message = "{blnocntr.cntrsize.length}")
    private String cntrSize;

    @Schema(description = "箱主代码")
    @NotBlank(message = "{blno.cntrowner.notblank}")
    @Length(max = 5, message = "{blno.cntrowner.length}")
    private String cntrOwner;

    @Schema(description = "箱内货物件数", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{blnocntr.quantity.notnull}")
    private Integer quantity;

    @Schema(description = "箱内货物毛重", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{blnocntr.grossweight.notnull}")
    private BigDecimal grossWeight;

    @Schema(description = "箱内货物体积", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{blnocntr.measurement.notnull}")
    private BigDecimal measurement;

    @Schema(description = "箱皮重", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "{blnocntr.cntrtare.notnull}")
    private BigDecimal cntrTare;

    @Schema(description = "前超")
    private Integer overForward;

    @Schema(description = "后超")
    private Integer overAfter;

    @Schema(description = "左超")
    private Integer overLeft;

    @Schema(description = "右超")
    private Integer overRight;

    @Schema(description = "上超")
    private Integer overHeight;

    @Schema(description = "拼箱标记(同航次 同箱号就算拼)")
    private Boolean lcl;


    @Schema(description = "创建人", requiredMode = Schema.RequiredMode.REQUIRED)
    private String creator;
}
